#include "Object.h"


unsigned int Object::m_nextid = 0;

Object::Object()
{
	m_name = 0;
	m_uid = m_nextid++;
}

Object::~Object()
{
	delete[] m_name;
}

void Object::set_name( const char* name )
{
	delete[] m_name;

	if ( name )
	{
		m_name = new char[strlen(name)+1];
		strcpy( m_name, name );
	}
	else
	{
		m_name = 0;
	}
}

const char* Object::get_name()
{
	return m_name;
}